home *** CD-ROM | disk | FTP | other *** search
-
- //------------------------------------------------------------------->
- //
- // marbles.pov - Glass marbles on a wood floor.
- //
- // Created by: ptdawson@voicenet.com
- //
- //------------------------------------------------------------------->
-
- #declare Show_Floor = on
- #declare Show_Marbles = on
-
- global_settings { max_trace_level 20 }
-
- #include "colors.inc"
- #include "textures.inc"
- #include "metals.inc"
- #include "glass.inc"
- #include "woods.inc"
- #include "skies.inc"
-
- #default { finish { Shiny } }
- background { White }
-
- #declare R = seed(111)
- #declare R2 = seed(111)
- #declare R3 = seed(111)
-
- sky_sphere { S_Cloud1 rotate y*180 }
-
- //------------------------------------------------------------------->
- // Camera.
-
- camera { location < 5, 10, -18 > look_at < 10, 0, -10 > }
-
- //------------------------------------------------------------------->
- // Lights.
-
- light_source { < -30, 60, -20 > color rgb 2 }
- light_source { < 30, 20, -90 > color rgb 1 }
-
- //------------------------------------------------------------------->
- // Random short wood pieces.
-
- #if ( Show_Floor = on )
-
- #debug "Starting wood floor...\n"
-
- #declare Z = -20 #while ( Z <= 15 )
-
- #declare X = 0 #while ( X < 35 )
-
- #declare X2 = X + (rand(R)*3)+1
- box { < X, -2, Z > < X2 - 0.01, 0, Z+0.99 >
-
- #declare TEX = int(rand(R)*35)+1
- #if(TEX= 1)texture{T_Wood1 rotate y*90}#end
- #if(TEX= 2)texture{T_Wood2 rotate y*90}#end
- #if(TEX= 3)texture{T_Wood3 rotate y*90}#end
- #if(TEX= 4)texture{T_Wood4 rotate y*90}#end
- #if(TEX= 5)texture{T_Wood5 rotate y*90}#end
- #if(TEX= 6)texture{T_Wood6 rotate y*90}#end
- #if(TEX= 7)texture{T_Wood7 rotate y*90}#end
- #if(TEX= 8)texture{T_Wood8 rotate y*90}#end
- #if(TEX= 9)texture{T_Wood9 rotate y*90}#end
- #if(TEX=10)texture{T_Wood10 rotate y*90}#end
- #if(TEX=11)texture{T_Wood11 rotate y*90}#end
- #if(TEX=12)texture{T_Wood12 rotate y*90}#end
- #if(TEX=13)texture{T_Wood13 rotate y*90}#end
- #if(TEX=14)texture{T_Wood14 rotate y*90}#end
- #if(TEX=15)texture{T_Wood15 rotate y*90}#end
- #if(TEX=16)texture{T_Wood16 rotate y*90}#end
- #if(TEX=17)texture{T_Wood17 rotate y*90}#end
- #if(TEX=18)texture{T_Wood18 rotate y*90}#end
- #if(TEX=19)texture{T_Wood19 rotate y*90}#end
- #if(TEX=20)texture{T_Wood20 rotate y*90}#end
- #if(TEX=21)texture{T_Wood21 rotate y*90}#end
- #if(TEX=22)texture{T_Wood22 rotate y*90}#end
- #if(TEX=23)texture{T_Wood23 rotate y*90}#end
- #if(TEX=24)texture{T_Wood24 rotate y*90}#end
- #if(TEX=25)texture{T_Wood25 rotate y*90}#end
- #if(TEX=26)texture{T_Wood26 rotate y*90}#end
- #if(TEX=27)texture{T_Wood27 rotate y*90}#end
- #if(TEX=28)texture{T_Wood28 rotate y*90}#end
- #if(TEX=29)texture{T_Wood29 rotate y*90}#end
- #if(TEX=30)texture{T_Wood30 rotate y*90}#end
- #if(TEX=31)texture{T_Wood31 rotate y*90}#end
- #if(TEX=32)texture{T_Wood32 rotate y*90}#end
- #if(TEX=33)texture{T_Wood33 rotate y*90}#end
- #if(TEX=34)texture{T_Wood34 rotate y*90}#end
- #if(TEX=35)texture{T_Wood35 rotate y*90}#end
-
- // Middle layer.
- texture {
- pigment { color rgbf < 1, 1, 1, 0.99 > }
- finish { Shiny } }
-
- // Top layer.
- texture {
- pigment { color rgbf < 1, 1, 1, 0.99 > }
- finish { F_MetalE } }
-
- } // End of box.
-
- #declare X = X2 #end
-
- #declare Z = Z + 1 #end
-
- #end // End of if block.
-
- //------------------------------------------------------------------->
- // Glass marbles.
-
- #if ( Show_Marbles = on )
-
- #debug "Starting glass marbles...\n"
-
- #declare X = 0 #while ( X <= 35 )
- #declare Z = -20 #while ( Z <= 15 )
-
- #declare SIZE = (rand(R3)*0.5) + 0.5
-
- sphere { < X+(rand(R2)*2), SIZE, Z+(rand(R2)*2) >, SIZE
- finish { F_Glass1 }
- #declare RRR = (rand(R3)*0.5)+0.5
- #declare GGG = (rand(R3)*0.5)+0.5
- #declare BBB = (rand(R3)*0.5)+0.5
- pigment { color rgbf < RRR, GGG, BBB, 0.95 > } }
-
-
- #declare Z = Z + 3 #end
- #declare X = X + 3 #end
-
- #end // End of if block.
-
- //------------------------------------------------------------------->
- // Bye!
-
-